From c8f3292ab86ac45e234e7ed25b12da4b02a107ea Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 19 Jun 2008 14:49:08 +0000 Subject: [PATCH] Toss non-ascii characters in mkshort. --- gpsbabel/mkshort.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gpsbabel/mkshort.c b/gpsbabel/mkshort.c index e1e1b96fa..9add38dc6 100644 --- a/gpsbabel/mkshort.c +++ b/gpsbabel/mkshort.c @@ -382,7 +382,6 @@ mkshort(short_handle h, const char *istring) int i, l, nlen, replaced; mkshort_handle *hdl = (mkshort_handle *) h; - /* * A rather horrible special case hack. * If the target length is "6" and the source length is "7" and @@ -454,6 +453,8 @@ mkshort(short_handle h, const char *istring) continue; if (hdl->goodchars && (!strchr(hdl->goodchars, tstring[i]))) continue; + if (!isascii(tstring[i])) + continue *cp++ = tstring[i]; } *cp = 0; -- 2.30.2